<?php

namespace app\controller\front;

use app\BaseController;
use app\model\Event as EventModel;
use app\model\DingUser as DingUserModel;

class Event extends BaseController
{

    public function getEvents()
    {
        $params = request()->param();
        $id = $params['uid'];
        $res = EventModel::where("user_id = $id")->order('get_time desc')->select()->toArray();
        $info = DingUserModel::find($id);
        array_push($res, ['get_time' => $info['hiredDate'],'id' => 'event','user_id' => $id,'title' => '入职UU第一天','desc' => '在'.$info['hiredDate'].'这一天加入UU跑腿大家庭']);
        return $this->successMessage('查询成功',$res);
    }


}